<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
    <h1>hello world</h1>
    <div id="app">
        商品单价：<input type="text" v-model="price"/>
        <br/><br/><br/>
        商品数量：<input type="text" v-model="number"/>
        <br/><br/><br/>
        商品总价：{{total}}
    </div>
</body>
<script src="./js/vue.js"></script>
<script>
    Vue.config.devtools = true;
    const vm = new Vue({
        el:'#app',
        data: {
            price: 13.3,
            number: 20 
        },
        methods: {
           discount(){
            
           }
        },
        computed: {
            total() {
                console.log("get方法被调用");
                return this.price * this.number;
            }
        },
    })
    console.log(vm);
</script>
</html>